[{
	action: '1.100',
	method: [{
		'1.1.0001': '账号密码登录',
		'1.1.0002': '自动登录',
		'1.1.0007': '获取二维码字符串',
		'1.2.0001': '被踢下线'
	}]
}, {
	action: '1.500',
	method: [{
		'1.1.1001': '发送消息是否成功',
		'1.1.2001': '发送群消息是否成功',
		'1.3.1001': '收到离线消息条数',
		'1.3.1002': '收到离线消息',
		'1.2.2001': '收到群发消息',
		'1.2.1001': '收到单聊消息',
	}]
}, {
	action: '1.501',
	method: [{
		'1.1.0001': '发送广播是否成功',
		'1.1.0002': '收到订阅号消息'
	}]
}]

if(head.has("resultCode")) { //发信回收判断
	if(head.getString("resultCode").equals("0")) { //非登录报文发送失败，重新登录
		if(ISINIT) {
			String phonenumber = mSharedPreferences.getString("phoneNumber", "");
			String password = mSharedPreferences.getString("password", "");
			String msg = BuildMessage.buildAutoLoginMessage(phonenumber, password);
			SessionManager.getInstance().writeToServer(msg);
		}
	}
	if(head.getString("action").equals("1.100") && head.getString("method").equals("1.1.0001")) { //登录返回报文处理
		//                    processLogin(object, head);
		if(object.getJSONObject("info").getBoolean("success")) {
			LoginEvent loginEvent = new LoginEvent("true");
			EventBus.getDefault().post(loginEvent);
			String userId = object.getJSONObject("body").getJSONObject("userData").getString("id");
			getOfflineMessageNumber(userId);
		} else {
			LoginEvent loginEvent = new LoginEvent(object.getJSONObject("info").getJSONArray("warnings").getJSONObject(0).getString("text"));
			EventBus.getDefault().post(loginEvent);
			//                        String phonenumber = mSharedPreferences.getString("phoneNumber", "");
			//                        String password = mSharedPreferences.getString("password", "");
			//                        String msg = BuildMessage.buildAutoLoginMessage(phonenumber, password);
			//                        SessionManager.getInstance().writeToServer(msg);
		}
	}
	if(head.getString("action").equals("1.100") && head.getString("method").equals("1.1.0002")) { //自动登录返回报文处理
		//                    processLogin(object, head);
		if(object.getJSONObject("info").getBoolean("success")) {
			LoginEvent loginEvent = new LoginEvent("true");
			EventBus.getDefault().post(loginEvent);
			String userId = object.getJSONObject("body").getJSONObject("userData").getString("id");
			getOfflineMessageNumber(userId);
		} else {
			LoginEvent loginEvent = new LoginEvent("false");
			EventBus.getDefault().post(loginEvent);
			//                        String phonenumber = mSharedPreferences.getString("phonenumber", "");
			//                        String password = mSharedPreferences.getString("password", "");
			//                        String msg = BuildMessage.buildAutoLoginMessage(phonenumber, password);
			//                        SessionManager.getInstance().writeToServer(msg);
		}
	} else if(head.getString("action").equals("1.500") && head.getString("method").equals("1.1.1001")) { //发送消息是否成功处理
		processMessageSuccess(head);
	} else if(head.getString("action").equals("1.500") && head.getString("method").equals("1.1.2001")) { //发送群消息是否成功处理
		processGroupMessageSuccess(object, head);
	} else if(head.getString("action").equals("1.501") && head.getString("method").equals("1.1.0001")) { //发送广播是否成功处理
		if(head.getString("resultCode").equals("1")) {
			BroadcastSuccessEvent broadcastSuccessEvent = new BroadcastSuccessEvent("true");
			EventBus.getDefault().post(broadcastSuccessEvent);
		} else {
			BroadcastSuccessEvent broadcastSuccessEvent = new BroadcastSuccessEvent("false");
			EventBus.getDefault().post(broadcastSuccessEvent);
		}
	}
} else if(head.getString("action").equals("1.100") && head.getString("method").equals("1.2.0001")) { //被踢下线
	LoginEvent loginEvent = new LoginEvent("在别处登录");
	EventBus.getDefault().post(loginEvent);
	String userId = mSharedPreferences.getString("userId", "");
	getOfflineMessageNumber(userId);
} else if(head.getString("action").equals("1.500") && head.getString("method").equals("1.3.1001")) { //收到离线消息条数
	JSONObject body = object.getJSONObject("body");
	JSONObject content = body.getJSONObject("content");
	String timestamp = content.getString("timestamp");
	JSONArray sections = content.getJSONArray("sections");
	JSONArray items = sections.getJSONObject(0).getJSONArray("items");
	//                Logger.e("getReceiveMessageEvent:items.length() "+items.length());
	if(items.length() > 0) {
		for(int i = 0; i < items.length(); i++) {
			JSONObject item = items.getJSONObject(i);
			Logger.d("getReceiveMessageEvent:收到离线消息条数" + item.toString());
			String total = item.getString("value");
			String type = item.getString("type");
			String userId = item.getString("sendId");
			SharedPreferences mSharedPreferences = context.getSharedPreferences("userInfo", MODE_PRIVATE);
			String receiveId = mSharedPreferences.getString("userId", "false");
			String times = "0";
			if(!type.equals("0")) {
				getOfflineMessage(type, userId, receiveId, times, total);
			}
		}
	}
	//                JSONObject value = item.getJSONObject("value");
} else if(head.getString("action").equals("1.500") && head.getString("method").equals("1.3.1002")) { //收到离线消息
	processOfflineMessage(object);
} else if(head.getString("action").equals("1.501") && head.getString("method").equals("1.1.0001")) { //收到广播消息
	processBroadcastMessage(object, head);
} else if(head.getString("action").equals("1.501") && head.getString("method").equals("1.1.0002")) { //收到订阅号消息
	processSubscriptionMessage(object, head);
} else if(head.getString("action").equals("1.500") && head.getString("method").equals("1.2.1001")) { //收到个人发的消息
	processMessage(object, head);
} else if(head.getString("action").equals("1.500") && head.getString("method").equals("1.2.2001")) { //收群到发的消息
	processGroupMessage(object, head);
} else if(head.getString("action").equals("1.900")) { //收群到发系统的消息
	processSysMessage(object, head);
}
}